feat(vsts): Add API-driven integration setup#113073
feat(vsts): Add API-driven integration setup#113073evanpurkhiser wants to merge 1 commit intomasterfrom
Conversation
Backend Test FailuresFailures on
|
041107b to
12fdf4e
Compare
Backend Test FailuresFailures on
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 12fdf4e. Configure here.
| ).capture() as lifecycle: | ||
| oauth_data = pipeline.fetch_state("oauth_data") or {} | ||
| access_token = oauth_data.get("access_token") | ||
| user = get_user_info(access_token) |
There was a problem hiding this comment.
Unhandled None access_token crashes get_step_data
Medium Severity
In get_step_data, oauth_data.get("access_token") can return None, which is then passed to get_user_info. That function builds an auth header "bearer None" and calls raise_for_status() on the resulting 401 response, raising an unhandled HTTPError that surfaces as a 500 to the caller. Unlike the legacy AccountConfigView.dispatch (which shares this weakness), this new API-driven path has no intermediary error handling, so the raw exception propagates directly to the API endpoint. A guard or early error return before calling get_user_info would prevent the crash.
Reviewed by Cursor Bugbot for commit 12fdf4e. Configure here.
12fdf4e to
8322207
Compare
| def get_serializer_cls(self) -> type: | ||
| return VstsAccountSelectionSerializer | ||
|
|
||
| def get_step_data(self, pipeline: IntegrationPipeline, request: HttpRequest) -> dict[str, Any]: |
There was a problem hiding this comment.
It could be nice to return a typed dict here since we know exactly what fields we're returning
There was a problem hiding this comment.
Ah yeah this should be typed better
Add API-driven setup steps for the Azure DevOps (VSTS) integration so it can use the pipeline API instead of the legacy server-rendered flow. Use the shared OAuth API step with the VSTS new identity provider and add a dedicated account selection step for choosing the Azure DevOps organization. Refs [VDY-43: Azure DevOps (VSTS): API-driven integration setup](https://linear.app/getsentry/issue/VDY-43/azure-devops-vsts-api-driven-integration-setup)
8322207 to
9a68ff2
Compare


Add API-driven setup steps for the Azure DevOps (VSTS) integration so it
can use the pipeline API instead of the legacy server-rendered flow.
Use the shared OAuth API step with the VSTS new identity provider and
add a dedicated account selection step for choosing the Azure DevOps
organization.
Refs VDY-43: Azure DevOps (VSTS): API-driven integration setup